package com.example.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.service.IHelloService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Reference(interfaceClass = IHelloService.class )
    IHelloService helloService;

    @GetMapping("/hello/{str}")
    public String print(@PathVariable("str") String str){
        String s = helloService.printString(str);
        return s;
    }
}
